/*   1:    */ package com.atomikos.icatch.admin.imp;
/*   2:    */ 
/*   3:    */ import com.atomikos.swing.PropertiesTableModel;
/*   4:    */ import java.util.Vector;
/*   5:    */ import javax.swing.table.AbstractTableModel;
/*   6:    */ import javax.swing.table.TableModel;
/*   7:    */ 
/*   8:    */ class StateTableModel
/*   9:    */   extends AbstractTableModel
/*  10:    */   implements PropertiesTableModel
/*  11:    */ {
/*  12:    */   private Vector data_;
/*  13:    */   
/*  14:    */   StateTableModel(Vector data)
/*  15:    */   {
/*  16: 48 */     this.data_ = data;
/*  17:    */   }
/*  18:    */   
/*  19:    */   Vector getData()
/*  20:    */   {
/*  21: 53 */     return this.data_;
/*  22:    */   }
/*  23:    */   
/*  24:    */   public TableModel getTableModel()
/*  25:    */   {
/*  26: 58 */     return this;
/*  27:    */   }
/*  28:    */   
/*  29:    */   public int getRowCount()
/*  30:    */   {
/*  31: 63 */     return this.data_.size();
/*  32:    */   }
/*  33:    */   
/*  34:    */   public int getColumnCount()
/*  35:    */   {
/*  36: 68 */     return 1;
/*  37:    */   }
/*  38:    */   
/*  39:    */   public Object getValueAt(int row, int column)
/*  40:    */   {
/*  41: 73 */     StateDescriptor rec = (StateDescriptor)this.data_.elementAt(row);
/*  42: 74 */     if (column == 0) {
/*  43: 75 */       return rec.state;
/*  44:    */     }
/*  45: 77 */     return null;
/*  46:    */   }
/*  47:    */   
/*  48:    */   public String getColumnName(int col)
/*  49:    */   {
/*  50: 82 */     if (col == 0) {
/*  51: 83 */       return "Termination State";
/*  52:    */     }
/*  53: 85 */     return "unknown";
/*  54:    */   }
/*  55:    */   
/*  56:    */   public boolean isCellEditable(int row, int col)
/*  57:    */   {
/*  58: 90 */     return false;
/*  59:    */   }
/*  60:    */   
/*  61:    */   public void rowDeleted(int row)
/*  62:    */   {
/*  63: 95 */     fireTableRowsDeleted(row, row);
/*  64:    */   }
/*  65:    */   
/*  66:    */   public void refresh()
/*  67:    */   {
/*  68:100 */     fireTableRowsUpdated(0, this.data_.size());
/*  69:    */   }
/*  70:    */   
/*  71:    */   public void rowInserted()
/*  72:    */   {
/*  73:105 */     fireTableRowsInserted(0, this.data_.size());
/*  74:    */   }
/*  75:    */ }


/* Location:           C:\myfile\mysoft\apache-maven-3.5.0-bin\apache-maven-3.5.0\myrep\com\atomikos\transactions\3.7.0\transactions-3.7.0.jar
 * Qualified Name:     com.atomikos.icatch.admin.imp.StateTableModel
 * JD-Core Version:    0.7.0.1
 */